package com.cherrypt.api.core.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cherrypt.api.common.exception.TipException;
import com.cherrypt.api.model.dataobject.Torrent;

import java.util.List;

/**
 * @author intent
 * @date 2019/7/23 20:00
 * @about <link href='http://zzyitj.xyz/'/>
 */
public interface TorrentService extends IService<Torrent> {
    void saveRedisTorrent(Torrent torrent);

    Torrent getRedisTorrentByTid(int tid);

    Torrent getTorrentByTid(int tid) throws TipException;

    Torrent getTorrentByHash(byte[] infoHash);

    boolean existHash(byte[] infoHash);
}
